package com.xd.pre.modules.tpshop.virtuaBean;

import com.xd.pre.modules.tpshop.domain.TpOrderGoods;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
//@AllArgsConstructor
public class OrderVirtual2App {    // app: SPOrder.java

    private Integer orderId;
    private String orderSn;
    private Integer userId;

//	private Integer actionId;  //订单状态表 `tp_order_action` 他需要`order_id`+`log_time`+`order_status`+`shipping_status`+`pay_status` 查找

    private Integer orderStatus;
    private Integer shippingStatus;
    private Integer payStatus;

    //	private Integer addressId;
//	private Integer shippingId;
//	private Integer paymentId;
    String consignee;   //consignee 收货人       Address表
    Integer province;    //省份(province)         Address表
    Integer city;        //                      Address表
    Integer district;    //                      Address表
    Integer town;        // //街道/镇             Address表
    String address;     //详细地址(address)       Address表
    String mobile;      //                      Address表
    String email;       //                      Address表
    // 10（`tp_payment` 支付表：）
    Integer isCod;       //是否货到付款 is_cod    来自 `tp_payment` 支付表 ！！！
    String payCode;    //支付code(pay_code)         `tp_payment`id   ##//取值表tp_payment 支付表
    String payName;    //支付方式名称(pay_name)       `tp_payment`id
    // 11（`tp_shipping` 配送物流表：）
    String shippingCode;    //物流code(shipping_code)      `tp_shipping`id    ##//取值表`tp_shipping` 配送物流表
    String shippingName;    //物流名称(shipping_name)       `tp_shipping`id

    private String invoiceTitle;

    private Double goodsPrice;
    private Double shippingPrice;
    private Double userMoney;
    private Double couponPrice;
    private Integer integral;
    private Double integralMoney;
    private Double orderAmount;
    private Double totalAmount;
    private Integer addTime;

    private Integer shippingTime;        //'最后新发货时间'DEFAULT '0'
    private Integer confirmTime;        //'收货确认时间'DEFAULT '0'
    private Integer payTime;            //'支付时间'DEFAULT '0'

    private Integer orderPromId;
    private Double orderPromAmount;

    private Double discount;    //'价格调整DEFAULT '0.00'
    private String userNote;    //'用户备注DEFAULT null
    private String adminNote;    //'管理员备注DEFAULT null
    private String parentSn;    //'父单单号'DEFAULT null
    private Integer isDistribut;//'是否已分成0未分成1已分成''DEFAULT '0'


    /****** 额外增加字段(控制订单列表按钮状态) for app ****************/
    int payBtn = 0;    //pay_btn (支付按钮)
    int cancelBtn = 0;    //cancel_btn (取消订单按钮) 0: 隐藏, 1:显示
    int receiveBtn = 0;    //receive_btn (确认收货按钮) 0: 隐藏, 1:显示
    int commentBtn = 0;    //comment_btn (评价按钮) 0: 隐藏, 1:显示
    int shippingBtn = 0;    //shipping_btn (查看物流) 0: 隐藏, 1:显示
    int returnBtn = 0;    //return_btn (联系客服/退换货) 0: 隐藏, 1:显示
    String orderStatusCode;    //order_status_code (订单状态:英文)
    String orderStatusDesc;    //order_status_code (订单状态:中文)

    List<TpOrderGoods> goods_list;


    public OrderVirtual2App(Integer orderId, String orderSn, Integer userId,
                            Integer orderStatus, Integer shippingStatus, Integer payStatus,
//			Integer addressId, Integer shippingId, Integer paymentId,
                            String consignee, Integer province, Integer city, Integer district,
                            Integer town, String address, String mobile, String email,
                            Integer isCod, String payCode, String payName, String shippingCode,
                            String shippingName, String invoiceTitle, Double goodsPrice,
                            Double shippingPrice, Double userMoney, Double couponPrice,
                            Integer integral, Double integralMoney, Double orderAmount,
                            Double totalAmount, Integer addTime, Integer shippingTime,
                            Integer confirmTime, Integer payTime, Integer orderPromId,
                            Double orderPromAmount, Double discount, String userNote,
                            String adminNote, String parentSn, Integer isDistribut, int payBtn,
                            int cancelBtn, int receiveBtn, int commentBtn, int shippingBtn,
                            int returnBtn, String orderStatusCode, String orderStatusDesc,
                            List<TpOrderGoods> goods_list) {
        super();
        this.orderId = orderId;
        this.orderSn = orderSn;
        this.userId = userId;

        this.orderStatus = orderStatus;
        this.shippingStatus = shippingStatus;
        this.payStatus = payStatus;

//		this.addressId = addressId;
//		this.shippingId = shippingId;
//		this.paymentId = paymentId;
        this.consignee = consignee;
        this.province = province;
        this.city = city;
        this.district = district;
        this.town = town;
        this.address = address;
        this.mobile = mobile;
        this.email = email;

        this.isCod = isCod;
        this.payCode = payCode;
        this.payName = payName;
        this.shippingCode = shippingCode;
        this.shippingName = shippingName;

        this.invoiceTitle = invoiceTitle;

        this.goodsPrice = goodsPrice;
        this.shippingPrice = shippingPrice;
        this.userMoney = userMoney;
        this.couponPrice = couponPrice;
        this.integral = integral;
        this.integralMoney = integralMoney;
        this.orderAmount = orderAmount;
        this.totalAmount = totalAmount;
        this.addTime = addTime;
        this.shippingTime = shippingTime;
        this.confirmTime = confirmTime;
        this.payTime = payTime;
        this.orderPromId = orderPromId;
        this.orderPromAmount = orderPromAmount;
        this.discount = discount;
        this.userNote = userNote;
        this.adminNote = adminNote;
        this.parentSn = parentSn;
        this.isDistribut = isDistribut;
        this.payBtn = payBtn;
        this.cancelBtn = cancelBtn;
        this.receiveBtn = receiveBtn;
        this.commentBtn = commentBtn;
        this.shippingBtn = shippingBtn;
        this.returnBtn = returnBtn;
        this.orderStatusCode = orderStatusCode;
        this.orderStatusDesc = orderStatusDesc;
        this.goods_list = goods_list;
    }

}
